import request from '@/utils/request'

export function courseList(data) {
  return request({
    url: 'course/manage/teacher/pageCourseLsit',
    method: 'post',
    data
  })
}

// 学校登录-分页查询课程列表
export const schoolCourseLsit = params => {
  return request({
    url: '/course/manage/school/pageCourseLsit',
    method: 'post',
    data: params
  })
}

// 购买课程
export const addCourseBuy = params => {
  return request({
    url: '/course/buy/addCourseBuy',
    method: 'post',
    data: params
  })
}

// 购买数量统计
export const purchaseCount31 = params => {
  return request({
    url: '/course/buy/countCourseBuyByCourseId',
    method: 'post',
    data: params
  })
}

// 课程目录
export const treeCourseCataloglist = params => {
  return request({
    url: '/course/manage/treeCourseCataloglist',
    method: 'post',
    data: params
  })
}

// 当前课程信息
export const courseDetail = params => {
  return request({
    url: '/course/manage/selectCourseById',
    method: 'post',
    data: params
  })
}

// 课程章节课时目录的资料上传
export const addCourseFile = params => {
  return request({
    url: '/course/manage/addCourseFile',
    method: 'post',
    data: params
  })
}

// 课程章节课时目录的资料上传
export const deleteCourseById = params => {
  return request({
    url: '/course/manage/deleteCourseById',
    method: 'post',
    data: params
  })
}
